<div class="title"><%= @title.pluralize.capitalize %></div>
<div class="actions">Actions:
	<%= link_to "new", :action => 'new' %>
</div>
<table>
<tr>
	<% unless @params[:link_column] %>
		<th valign="top">link</th>
	<% end %>
	<% @crud_model.members.each do |member|  %>
		<th valign="top"><%= member.display_name %></th>
  	<% end %>
</tr>
<% for item in @list %>
	<tr>
		<% unless @model_params[:link_column] %>
			<td valign="top">
				<%= link_to("link", {:action => "show", :id => item}) %>
			</td>
		<% end %>
		<% @crud_model.members.each do |member|  %>
			<td valign="top">
				<% value = display_value(item, member, member.options[:list_limit]) %>
				<% if @model_params[:link_column] && (member.field_name == @model_params[:link_column]) then %>
					<%= link_to(value.empty? ? "link" : value, {:action => "show", :id => item}) %>
				<% else %>
					<%= value %>
				<% end %>
			</td>
		<% end %>
	</tr>
<% end %>
</table>

